package com.adtec.base.cloud.xxljobservise.xxljob.xxljob.service.impl;

import com.adtec.base.cloud.xxljobservise.xxljob.xxljob.service.XxljobWebService;
import com.adtec.base.cloud.xxljobservise.xxljob.xxljob.utils.CheckIpAndPortUtil;
import com.adtec.base.cloud.xxljobservise.xxljob.xxljob.utils.CmdUtil;
import com.adtec.base.cloud.xxljobservise.xxljob.xxljob.utils.ExecuteSQLUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class XxljobWebServiceImpl implements XxljobWebService {
    @Autowired
    ExecuteSQLUtil executeSQLUtil;
    @Autowired
    CheckIpAndPortUtil checkIpAndPortUtil;

    //http://localhost:8404/swagger-ui/index.html
    ///home/EnterpriseWeChatHospitalSystem/doc/shell
    @Override
    public void test(String param) {

        CmdUtil cmdUtil = new CmdUtil();
        try {
            String execCmd = cmdUtil.execCmd("sh ./hospital.sh -status", null);
            System.out.println(execCmd);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
